import request from '@/utils/request'

//查询合格供应商列表
export function listSupplier(query){
    return request({
        url: '/supplier/supplier/list',
        method: 'get',
        params: query
    })
}


export function listSupplierTender(query){
    return request({
        url: '/supplier/supplierTender/list',
        method: 'get',
        params: query
    })
}

export function listSupplier1(query){
    return request({
        url: '/supplier/supplier/noSupplierList',
        method: 'get',
        params: query
    })
}

export function listSupplier2(query){
    return request({
        url: '/supplier/supplier/supplierBagList',
        method: 'get',
        params: query
    })
}

export function wholeList(data){
    return request({
        url: '/supplier/supplier/whole',
        method: 'get',
        params: data
    })
}


export function wholeById(){
    return request({
        url: '/supplier/supplier/wholeById',
        method: 'get',
    })
}

// 查询供应商详细信息
export function getSupplier(hid){
    return request({
        url: '/supplier/supplier/'+hid,
        method: 'get'
    })
}
// 查询供应商详细信息
export function getAsSupplier(hid){
    return request({
        url: '/supplier/supplier/cd/'+hid,
        method: 'get'
    })
}

export function getSupplierByZrId(zr_id){
    return request({
        url: '/supplier/supplier/access/'+zr_id,
        method: 'get'
    })
}


// 新增供应商
export function addSupplier(data) {
    return request({
      url: '/supplier/supplier',
      method: 'post',
      data: data
    })
}

//修改供应商
export function updateSupplier(data){
    return request({
        url: '/supplier/supplier',
        method: 'put',
        data: data
    })
}
